/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 */
#include "BoidsManager.h"

namespace PQClient
{
	BoidsManager::BoidsManager(PQEngine::SceneObject* sceneObj)
		: _sceneObject(sceneObj)
	{
		loadBoids();
	}

	//xml config this?
	void BoidsManager::loadBoids()
	{
		/*
		for(int i=0;i<50;i++){
			Boid* boid=new Boid(_sceneObject,"fish","fish.mesh");
			_boidsVector.push_back(boid);

		}
		*/
		
		///*
		Boids* boids=0;
		boids=new Boids(_sceneObject,"fish","fish.mesh");
		_boidsVector.push_back(boids);
		//*/


	}

	BoidsManager::~BoidsManager()
	{
	}

	void BoidsManager::update(float deltaT)
	{
		
		int cnt=_boidsVector.size();
		for(int i=0;i<cnt;++i){
			_boidsVector[i]->update(deltaT);
		}
		

	}
}
